Cryptext x64 - Cryptext 3.4 Legacy Format (reverse-engineered draft)
===================================================================
Status: 0.11v, pending empirical validation against files produced by the real
Cryptext 3.4 application.

Purpose
-------
Decrypt-only recovery compatibility. Cryptext x64 NEVER writes this format.

Password material
-----------------
The original Cryptext 3.4 password dialog is ANSI. The entered password bytes
are hashed as:

    passwordHash = SHA1(passwordBytes)

On-disk layout
--------------

    offset 0                         RC4 ciphertext of original file body
    offset original_size             12 bytes per-file data
    offset original_size + 12        20-byte password check
    total size                        original_size + 32

The 12 bytes are generated by the old program as 8 bytes from
GetSystemTimeAsFileTime followed by 4 bytes from _rand(). They are cleartext
key-diversification material, not plaintext metadata required for recovery.

Password check
--------------

    check = SHA1(passwordHash || ASCII "Cryptext")

The stored final 20 bytes are compared to this value before decrypting.

RC4 key
-------

    rc4Key = SHA1(passwordHash || perFileData12)

The original implementation uses standard RC4 KSA/PRGA with this 20-byte key.
File I/O is performed in 0x4000 (16 KiB) blocks while RC4 state continues
across block boundaries.

Important integrity limitation
------------------------------
The trailing SHA-1 value validates the password material. It is NOT a MAC over
the encrypted file body. Legacy recovery therefore cannot provide the modern
whole-file tamper guarantee of CT64FILE v1 / AES-GCM.

Cryptext x64 transaction policy
-------------------------------
0.11v does not reproduce the old in-place decryption. It keeps the encrypted
source read-only, writes hidden Originalname.temp, flushes it, re-reads source
and temp for a second deterministic decrypt/byte comparison, commits with
MoveFileExW WRITE_THROUGH, restores filesystem times/basic attributes, and only
then optionally deletes the legacy .$#! source.
